package pojo;

import org.springframework.amqp.rabbit.support.CorrelationData;

public class MessageCorrelationData extends CorrelationData {
    Object msg;
    String routeKey;
    String exchange;
    int retryNum;


    public MessageCorrelationData(Object msg, String routeKey, String exchange) {
        this.msg = msg;
        this.routeKey = routeKey;
        this.exchange = exchange;
    }

    /**
     * Gets the value of msg.
     *
     * @return the value of msg
     */
    public Object getMsg() {
        return msg;
    }

    /**
     * Gets the value of retryNum.
     *
     * @return the value of retryNum
     */
    public int getRetryNum() {
        return retryNum;
    }

    /**
     * Sets the retryNum.
     *
     * @param retryNum retryNum
     */
    public void setRetryNum(int retryNum) {
        this.retryNum = retryNum;
    }

    /**
     * Sets the msg.
     *
     * @param msg msg
     */
    public void setMsg(Object msg) {
        this.msg = msg;
    }

    /**
     * Gets the value of routeKey.
     *
     * @return the value of routeKey
     */
    public String getRouteKey() {
        return routeKey;
    }

    @Override
    public String toString() {
        return "MessageCorrelationData{" +
                "msg=" + msg +
                ", routeKey='" + routeKey + '\'' +
                ", exchange='" + exchange + '\'' +
                '}';
    }

    /**
     * Sets the routeKey.
     *
     * @param routeKey routeKey
     */
    public void setRouteKey(String routeKey) {
        this.routeKey = routeKey;
    }

    /**
     * Gets the value of exchange.
     *
     * @return the value of exchange
     */
    public String getExchange() {
        return exchange;
    }

    /**
     * Sets the exchange.
     *
     * @param exchange exchange
     */
    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    public MessageCorrelationData(String id, Object msg, String routeKey, String exchange) {
        super(id);
        this.msg = msg;
        this.routeKey = routeKey;
        this.exchange = exchange;
    }
}
